﻿using System;
using Missbot.Core.Scheduler;

namespace Missbot.AIModule.Schedulers
{
    public class FixHourSpan : IScheduleSpan
    {
        public int FixHour { get; init; }
        
        public TimeSpan GetNextTriggerSpan()
        {
            return DateTime.Now.Hour < FixHour ? DateTime.Today.AddHours(FixHour) - DateTime.Now : DateTime.Today.AddHours(24 + FixHour) - DateTime.Now;
        }
    }
}